package com.yunji.order.provide;

import com.yunji.coupon.dto.OrderAmtDTO;
import com.yunji.order.bo.ExistsOrderBO;
import com.yunji.order.business.OrderBusiness;
import com.yunji.order.domain.OrderDO;
import com.yunji.order.dto.OrderDetailDTO;
import com.yunji.order.service.OrderService;
import com.yunji.product.bo.ProductOrderBO;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author : peter-zhu
 * @date : 2024/10/26 16:54
 * @description : TODO
 **/
@Component
public class OrderProvide {

    @Resource
    private OrderService orderService;

    @Resource
    private OrderBusiness orderBusiness;

    public boolean existsOrder(ExistsOrderBO existsOrderBO) {
        return orderService.existsOrder(existsOrderBO);
    }

    public boolean existsOrderBySiteIds(List<Long> siteIds) {
        return orderService.existsBySiteIds(siteIds);
    }

    public OrderDO getByOrderId(Long orderId) {
        return orderService.getOrderById(orderId);
    }

    public Integer countProductOrderSale(ProductOrderBO bo) {
        return orderService.countProductOrderSale(bo);
    }
}
